<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>prometheus告警查看</title>
</head>
<body>
{#    <h2>最新50条告警消息</h2>#}
    <h3>time:按时间排序,severity:按告警严重程度和告警名称排序</h3>
    <form action="/alter/alterLastDate" method="post">
        <input list="browsers" name="type">
            <datalist id="browsers">
              <option value="time">
              <option value="severity">
            </datalist>
        <input type="submit">
    </form>

    <table class="table table-bordered" border="1xp">
    <tr>
        <th>发生时间</th>
        <th>告警名称</th>
        <th>主机</th>
        <th>描述</th>
        <th>值</th>
    </tr>
        {% for foo in alterlist %}
            <tr>
                <td>{{ foo.time }}</td>
                <td>{{ foo.alertname }}</td>
                <td>{{ foo.hostname }}</td>
                <td>{{ foo.description }}</td>
                <td>{{ foo.value }}</td>
            </tr>
        {% endfor %}
    </table>

</body>
</html>
